package com.jy.oms.framework.asyn.task.handler;

/**
 * 线程变量
 *
 * @author liuquan
 */
public class MethodTaskHandlerThreadLocal {

    private static ThreadLocal<Boolean> threadLocal = new ThreadLocal<>();

    public static void set(boolean methodTaskHandlerCaller) {
        threadLocal.set(methodTaskHandlerCaller);
    }

    public static boolean get() {
        Boolean value = threadLocal.get();
        return value != null ? value : false;
    }

    public static void clear() {
        threadLocal.remove();
    }
}
